Skip to content

fix(statistics): Keep saving error snapshots on repeated run() calls - #2450

Merged
vdusek merged 2 commits into
apify:masterfrom
Mantisus:statistics-reset-error-tracker
Nov 16, 2026
Merged

vdusek merged 2 commits into
apify:masterfrom
Mantisus:statistics-reset-error-tracker

Conversation

@Mantisus

Copy link
Copy Markdown
Collaborator

Description

  • Statistics.reset() clears its error trackers in place instead of replacing them with default ones, so save_error_snapshots and the other tracker options survive a reset. A crawler resets its statistics on every repeated run(), so until now error snapshots stopped from the second run on.
  • The error tracker gets a reset() method that forgets the tracked errors and keeps its options.

Testing

  • New unit tests for resetting the error tracker and the statistics.

✍️ Drafted by Claude Code

@Mantisus Mantisus self-assigned this Nov 15, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 15, 2026
@Mantisus
Mantisus requested a review from vdusek November 15, 2026 15:27
@vdusek vdusek changed the title fix(statistics): Keep saving error snapshots after statistics are reset fix(statistics): Keep saving error snapshots on repeated run() calls Nov 16, 2026

@vdusek vdusek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek
vdusek merged commit 16c127d into apify:master Nov 16, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants